<!DOCTYPE html>
<html lang="en">
<!-- 难点在于如何删除数据 -->

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <h1>小黑的书架</h1>
        <p v-for="book in books">{{book}} <button @click="">删除</button></p>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>

    <script>
        const app = new Vue({
            el: '#app',
            data: {
                books: [
                    "《红楼梦》曹雪芹",
                    "《西游记》吴承恩",
                    "《水浒传》施耐庵",
                    "《三国演义》罗贯中"
                ]
            }
        })
    </script>
</body>

</html>